# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=openscap-daemon
pkgver=0.1.10
pkgrel=6
pkgdesc="Manages continuous scans of your infrastructure"
url="https://www.open-scap.org/tools/openscap-daemon/"
arch="noarch"
license="LGPL-2.1-only"
depends="py3-gobject3"
makedepends="python3-dev"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/OpenSCAP/openscap-daemon/archive/$pkgver.tar.gz
	python-3.7.patch"

prepare() {
	default_prepare

	# Install dbus configuration to datadir instead of sysconfdir, latter is
	# local admins, former is packages
	sed -e 's| "etc", "dbus-1"| "usr", "share", "dbus-1"|' \
		-i setup.py
}

build() {
	python3 setup.py build
}

check() {
	python3 setup.py check
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
	rm -rf "$pkgdir"/usr/lib/systemd
}

sha512sums="93946b390cc95281b606967df783b8be6beb83da9fbca1951f2095dc24abe518440b6f967b29ae2b093536abe9af4effc3776e8d30f0ab2193b923c1bcf54e17  openscap-daemon-0.1.10.tar.gz
2363d46102ea0a25e3eeab36c292b3f70202ba7b19c6b89936c547eb829247adff578391641e5cd540021fb699b4a6ba5206db11cb8132c839d5e10379326d49  python-3.7.patch"
